#ifndef __EXYNOS4412_REG_LCD_H__
#define __EXYNOS4412_REG_LCD_H__

#define EXYNOS4412_LCD_BASE		(0x11c00000)

#define VIDCON0					(0x0000)
#define VIDCON1					(0x0004)
#define VIDCON2					(0x0008)
#define VIDCON3					(0x000c)
#define VIDTCON0				(0x0010)
#define VIDTCON1				(0x0014)
#define VIDTCON2				(0x0018)
#define VIDTCON3				(0x001c)
#define WINCON0					(0x0020)
#define WINCON1					(0x0024)
#define WINCON2					(0x0028)
#define WINCON3					(0x002c)
#define WINCON4					(0x0030)
#define SHADOWCON				(0x0034)
#define WINCHMAP2				(0x003c)

#define VIDOSD0A				(0x0040)
#define VIDOSD0B				(0x0044)
#define VIDOSD0C				(0x0048)
#define VIDOSD1A				(0x0050)
#define VIDOSD1B				(0x0054)
#define VIDOSD1C				(0x0058)
#define VIDOSD1D				(0x005c)
#define VIDOSD2A				(0x0060)
#define VIDOSD2B				(0x0064)
#define VIDOSD2C				(0x0068)
#define VIDOSD2D				(0x006c)
#define VIDOSD3A				(0x0070)
#define VIDOSD3B				(0x0074)
#define VIDOSD3C				(0x0078)
#define VIDOSD4A				(0x0080)
#define VIDOSD4B				(0x0084)
#define VIDOSD4C				(0x0088)

#define VIDW00ADD0B0			(0x00a0)
#define VIDW00ADD0B1			(0x00a4)
#define VIDW00ADD0B2			(0x20a0)
#define VIDW01ADD0B0			(0x00a8)
#define VIDW01ADD0B1			(0x00ac)
#define VIDW01ADD0B2			(0x20a8)
#define VIDW02ADD0B0			(0x00b0)
#define VIDW02ADD0B1			(0x00b4)
#define VIDW02ADD0B2			(0x20b0)
#define VIDW03ADD0B0			(0x00b8)
#define VIDW03ADD0B1			(0x00bc)
#define VIDW03ADD0B2			(0x20b8)
#define VIDW04ADD0B0			(0x00c0)
#define VIDW04ADD0B1			(0x00c4)
#define VIDW04ADD0B2			(0x20c0)
#define VIDW00ADD1B0			(0x00d0)
#define VIDW00ADD1B1			(0x00d4)
#define VIDW00ADD1B2			(0x20d0)
#define VIDW01ADD1B0			(0x00d8)
#define VIDW01ADD1B1			(0x00dc)
#define VIDW01ADD1B2			(0x20d8)
#define VIDW02ADD1B0			(0x00e0)
#define VIDW02ADD1B1			(0x00e4)
#define VIDW02ADD1B2			(0x20e0)
#define VIDW03ADD1B0			(0x00e8)
#define VIDW03ADD1B1			(0x00ec)
#define VIDW03ADD1B2			(0x20e8)
#define VIDW04ADD1B0			(0x00f0)
#define VIDW04ADD1B1			(0x00f4)
#define VIDW04ADD1B2			(0x20f0)
#define VIDW00ADD2				(0x0100)
#define VIDW01ADD2				(0x0104)
#define VIDW02ADD2				(0x0108)
#define VIDW03ADD2				(0x010c)
#define VIDW04ADD2				(0x0110)
#define VIDINTCON0				(0x0130)
#define VIDINTCON1				(0x0134)
#define W1KEYCON0				(0x0140)
#define W1KEYCON1				(0x0144)
#define W2KEYCON0				(0x0148)
#define W2KEYCON1				(0x014c)
#define W3KEYCON0				(0x0150)
#define W3KEYCON1				(0x0154)
#define W4KEYCON0				(0x0158)
#define W4KEYCON1				(0x015c)
#define W1KEYALPHA				(0x0160)
#define W2KEYALPHA				(0x0164)
#define W3KEYALPHA				(0x0168)
#define W4KEYALPHA				(0x016c)
#define DITHMODE				(0x0170)
#define WIN0MAP					(0x0180)
#define WIN1MAP					(0x0184)
#define WIN2MAP					(0x0188)
#define WIN3MAP					(0x018c)
#define WIN4MAP					(0x0190)
#define WPALCON_H				(0x019c)
#define WPALCON_L				(0x01a0)

#define TRIGCON					(0x01a4)
#define I80IFCONA0				(0x01b0)
#define I80IFCONA1				(0x01b4)
#define I80IFCONB0				(0x01b8)
#define I80IFCONB1				(0x01bc)
#define COLORGAINCON			(0x01c0)
#define LDI_CMDCON0				(0x01d0)
#define LDI_CMDCON1				(0x01d4)
#define SIFCCON0				(0x01e0)
#define SIFCCON1				(0x01e4)
#define SIFCCON2				(0x01e8)
#define HUECOEF_CR_1			(0x01ec)
#define HUECOEF_CR_2			(0x01f0)
#define HUECOEF_CR_3			(0x01f4)
#define HUECOEF_CR_4			(0x01f8)
#define HUECOEF_CB_1			(0x01fc)
#define HUECOEF_CB_2			(0x0200)
#define HUECOEF_CB_3			(0x0204)
#define HUECOEF_CB_4			(0x0208)
#define HUEOFFSET				(0x020c)
#define VIDW0ALPHA0				(0x021c)
#define VIDW0ALPHA1				(0x0220)
#define VIDW1ALPHA0				(0x0224)
#define VIDW1ALPHA1				(0x0228)
#define VIDW2ALPHA0				(0x022c)
#define VIDW2ALPHA1				(0x0230)
#define VIDW3ALPHA0				(0x0234)
#define VIDW3ALPHA1				(0x0238)
#define VIDW4ALPHA0				(0x023c)
#define VIDW4ALPHA1				(0x0240)
#define BLENDEQ1				(0x0244)
#define BLENDEQ2				(0x0248)
#define BLENDEQ3				(0x024c)
#define BLENDEQ4				(0x0250)
#define BLENDCON				(0x0260)
#define W0RTQOSCON				(0x0264)
#define W1RTQOSCON				(0x0268)
#define W2RTQOSCON				(0x026c)
#define W3RTQOSCON				(0x0270)
#define W4RTQOSCON				(0x0274)
#define LDI_CMD0				(0x0280)
#define LDI_CMD1				(0x0284)
#define LDI_CMD2				(0x0288)
#define LDI_CMD3				(0x028c)
#define LDI_CMD4				(0x0290)
#define LDI_CMD5				(0x0294)
#define LDI_CMD6				(0x0298)
#define LDI_CMD7				(0x029c)
#define LDI_CMD8				(0x02a0)
#define LDI_CMD9				(0x02a4)
#define LDI_CMD10				(0x02a8)
#define LDI_CMD11				(0x02ac)

#define SHD_VIDW00ADD0			(0x40a0)
#define SHD_VIDW01ADD0			(0x40a8)
#define SHD_VIDW02ADD0			(0x40b0)
#define SHD_VIDW03ADD0			(0x40b8)
#define SHD_VIDW04ADD0			(0x40c0)
#define SHD_VIDW00ADD1			(0x40d0)
#define SHD_VIDW01ADD1			(0x40d8)
#define SHD_VIDW02ADD1			(0x40e0)
#define SHD_VIDW03ADD1			(0x40e8)
#define SHD_VIDW04ADD1			(0x40f0)
#define SHD_VIDW00ADD2			(0x4100)
#define SHD_VIDW01ADD2			(0x4104)
#define SHD_VIDW02ADD2			(0x4108)
#define SHD_VIDW03ADD2			(0x410c)
#define SHD_VIDW04ADD2			(0x4110)

/* VIDCON0 */
#define VIDCON0_VIDOUT_RGB			(0x0 << 26)
#define VIDCON0_VIDOUT_I80LDI0		(0x2 << 26)
#define VIDCON0_VIDOUT_I80LDI1		(0x3 << 26)
#define VIDCON0_VIDOUT_WB_RGB		(0x4 << 26)
#define VIDCON0_VIDOUT_WB_I80LDI0	(0x6 << 26)
#define VIDCON0_VIDOUT_WB_I80LDI1	(0x7 << 26)
#define VIDCON0_VIDOUT_MASK			(0x7 << 26)
#define VIDCON0_CLKVAL_F(x)			(((x) & 0xff) << 6)

/* VIDTCON0 */
#define VIDTCON0_VBPDE(x)			(((x) & 0xff) << 24)
#define VIDTCON0_VBPD(x)			(((x) & 0xff) << 16)
#define VIDTCON0_VFPD(x)			(((x) & 0xff) << 8)
#define VIDTCON0_VSPW(x)			(((x) & 0xff) << 0)

/* VIDTCON1 */
#define VIDTCON1_VFPDE(x)			(((x) & 0xff) << 24)
#define VIDTCON1_HBPD(x)			(((x) & 0xff) << 16)
#define VIDTCON1_HFPD(x)			(((x) & 0xff) << 8)
#define VIDTCON1_HSPW(x)			(((x) & 0xff) << 0)

/* VIDTCON2 */
#define VIDTCON2_LINEVAL(x)			(((x) & 0x7ff) << 11)
#define VIDTCON2_HOZVAL(x)			(((x) & 0x7ff) << 0)

/* SHADOWCON */
#define SHADOWCON_PROTECT(x)		(((1 << x) & 0x1f) << 10)

/* Buffer Size */
#define VIDADDR_OFFSIZE(x)			(((x) & 0x1fff) << 13)
#define VIDADDR_PAGEWIDTH(x)		(((x) & 0x1fff) << 0)

/* VIDOSDxA, VIDOSDxB */
#define VIDOSD_LEFT_X(x)			(((x) & 0x7ff) << 11)
#define VIDOSD_TOP_Y(x)				(((x) & 0x7ff) << 0)
#define VIDOSD_RIGHT_X(x)			(((x) & 0x7ff) << 11)
#define VIDOSD_BOTTOM_Y(x)			(((x) & 0x7ff) << 0)

/* VIDOSD0C, VIDOSDxD */
#define VIDOSD_SIZE(x)				(((x) & 0xffffff) << 0)

#endif /* __EXYNOS4412_REG_LCD_H__ */
